package com.happly.happlycloud.controller.common;

import com.happly.happlycloud.controller.common.interceptor.AuthorityInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@SpringBootConfiguration
public class webAppConfiguration implements WebMvcConfigurer {

    @Autowired
    private AuthorityInterceptor authorityInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {

        InterceptorRegistration registration1 = registry.addInterceptor(authorityInterceptor);

        registration1.addPathPatterns("/manage/**");


    }
}